# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan Magnus Brevik <janmbrevik@gmail.com>

pkgname=gpodder
pkgver=3.11.4
pkgrel=1
pkgdesc='Podcast client written in Python using GTK'
arch=('any')
url='https://gpodder.github.io/'
license=('GPL3')
depends=('gtk3' 'python-cairo' 'dbus-python' 'python-gobject' 'python-mygpoclient'
         'python-podcastparser' 'python-requests')
makedepends=('intltool')
optdepends=('libnotify: Gtk+ Desktop Notifications extension'
            'python-mutagen: Tag downloaded files, Remove cover art from OGG files extensions'
            'webkit2gtk: HTML show notes'
            'youtube-dl: Youtube-dl extension')
source=("https://github.com/gpodder/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('8022a6c29157dc287b5661f8915d04404767c33b6858e8d1a6c728904f8dae55')

prepare() {
  cd $pkgname-$pkgver
  # Use gio open directly instead of xdg-open
  sed -i "s/\['xdg-open', filename\]/['gio', 'open', filename]/" src/gpodder/util.py
}

build() {
  cd $pkgname-$pkgver
  make messages
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
